Bentley HAMMER CONNECT Edition Help

Convergence Improvements for Control Valves

With HAMMER CONNECT version SS2, some improvements have been made to the numerical solver to increase the stability of the solutions when control valves exist in the model. If the control valves are allowed to change status with each iteration, then it is possible to have oscillating solutions that may not converge. With this version, users have a much greater control over convergence in some situations with complicated control logic, especially those where control valves can interact with one another.

An easy first step when a convergence problem exists is to increase the number of "Trials" (iterations) for each solution. A default value of 40 is provided, but for systems with many complicated control valves, it may be necessary to increase this value to permit the other valves described above a chance to achieve a solution. A value of 200 or more is not unreasonable for problematic models. Since this is a global value it needs to be set high enough to cover the most tricky time steps in the model. There is no adverse effect of having this value too high.

To prevent oscillations in solutions, the numerical solver can be allowed to make several iterations before it changes the status of pumps, check valves, flow control valves and pipes connected to tanks. While this may mean that it takes more iterations to reach a final solution, it tends to make the solution process more stable. The default value of this parameter (called "Convergence Check Frequency" - see Calculation Options) is set to 2 but if there are multiple control valves in the system and convergence problems are being encountered, this number can be increased. It should be substantially less than the total number of allowable trials or else controls will not be allowed to find their correct status. A representative increase in value from the default of 2, might be 10. Note that when "Convergence Check Frequency" is increased it is likely necessary to make a corresponding increase in Convergence Check Cut Off. This particular option is discussed below.

Once the status of valves has stabilized, the numerical solver can quickly converge to the solution. After a certain point, it is not productive to check the status of pumps and valves. This number of iterations is called the "Convergence Check Cut Off" and by default is set to 10. In models with complicated controls, it may be necessary to increase this value to enable the controls to reach a stable set of values before their status becomes fixed. To do this, the convergence check cut off should be increased to a number that is still less than or equal to the number of trials. An increase in this value may be, but is not necessarily, accompanied by an increase in the previously described "Convergence Check Frequency" value.

In order for the solution to not overshoot the correct values, the changes made in each iteration are controlled by damping the size of changes. Usually the parameter "Damping Limit" is set to 0 by default which indicates that no damping is needed. However, when numerical solutions have difficulty converging, this limit can be increased to something roughly an order of magnitude larger than the flow "Accuracy" which is set to 0.001 by default. With that default, a value for Damping limit of 0.01 should help to dampen out oscillations. With a value of 0.01 set it means that when convergence of the solution comes to within an accuracy value of 0.01 (as opposed to the tighter 0.001 value) damping will start by relaxing flow adjustments to 60% of the value they would be otherwise. Increasing the damping limit even higher than 0.01 may help in particularly difficult cases since damping will be initiated earlier. In all cases the damping limit needs to be relative to and higher than the calculation "Accuracy" value or 0 (damping off).

Another setting that can be modified to improve convergence that existed in the previous version of HAMMER CONNECT is the "Accuracy" value. This value defines the measure by which the solution method determines whether the hydraulic calculations are balanced. The default value is 0.001 which means the sum of the flow changes in all the links from the previous trial to the current one is less than 0.1% of the sum of the flows in all the links in the system. i.e., the numerical solution has converged to within a tight tolerance. This is a very conservative value. In some cases for models that have many pipes with small or no flow, it may be necessary to increase the hydraulic accuracy value (make the model slightly less accurate) to account for this relative measure of convergence.

There is a tradeoff between speed and stability in these numerical solutions. The default values are set with an emphasis on performance and are good for typical systems. As these above options to dampen solutions are implemented, they tend to slow the convergence. However, when working with systems with multiple interacting control valves, it may be necessary to sacrifice performance for stability and change the numerical values described above.